import request from '@/utils/request'
// 开启部分退货
export function openPartialReturn(data) {
  return request({
    url: '/refund/part/make',
    method: 'post',
    data: data
  })
}

// 修改退货商品件数
export function modifyQuantityOfItems(data) {
  return request({
    url: '/refund/part/modify',
    method: 'post',
    data: data
  })
}

// 移除某项退货商品
export function removeReturnedItem(saleItemId) {
  return request({
    url: '/refund/part/remove?saleItemId='+saleItemId,
    method: 'get',
  })
}

// 确认部分退货
export function confirmPartialReturn(data) {
  return request({
    url: '/refund/part/confirm',
    method: 'post',
    data: data
  })
}

// 确认全额退货
export function confirmFullReturn(data) {
  return request({
    url: '/refund/full',
    method: 'post',
    data: data
  })
}

// 查询退货单据
export function getRefundOrderNote(saleNo) {
  return request({
    url: '/refund/get?saleNo='+saleNo,
    method: 'get',
  })
}

//查询售后记录
export function queryRefund(queryForm) {
  return request({
    url: '/refund/list/ro',
    method: 'post',
    data: queryForm
  })
}

//查询售后商品
export function getRefundItem(id) {
  return request({
    url: '/refund/list/item?refundId='+id,
    method: 'post'
  })
}